﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace GUI
{
    public partial class WebFormRegistration : TripLOA.GUI.internationalization.LOABasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        protected void CreateUserButtonRender(object sender, EventArgs e)
        {
            this.Page.Form.DefaultButton = (sender as Button).UniqueID;
        }


        /// <summary>
        /// The "Members" role is configured automatically for the user who is registering to TripLOA
        /// </summary>
        protected void CreateUserWizard1_ActiveStepChanged(object sender, EventArgs e)
        {
            if (CreateUserWizard1.ActiveStep.ID == "CompleteWizardStep1")
            {
                if( Roles.RoleExists("Members") )
                    Roles.AddUserToRole(CreateUserWizard1.UserName,"Members");
            }
        }      

    }
}
